import 'package:lcapp/api/request/api_client.dart';
import 'package:lcapp/api/request/response_data.dart';

class FaxianAPI {
  static Future<ResponseData> getLastMsg() async {
    ResponseData responseData = await ApiClient.post("/api/message/discoverMessage",queryParameters: {
      "time":DateTime.now().millisecondsSinceEpoch
    });
    return ResponseData.createFrom(responseData, responseData.data);
  }
  static Future<ResponseData> getFriendsList(int page,int size) async {
    ResponseData responseData = await ApiClient.post("/api/message/SelectFollowMessage",data: {
      "page":page,
      "size":size
    });
    return ResponseData.createFrom(responseData, responseData.data);
  }

  static Future<ResponseData> getSystemList(int page,int size) async {
    ResponseData responseData = await ApiClient.post("/api/message/selectSystemMessage",data: {
      "page":page,
      "size":size
    });
    return ResponseData.createFrom(responseData, responseData.data);
  }

  static Future<ResponseData> getHDList(int page,int size) async {
    ResponseData responseData = await ApiClient.post("/api/message/interactionMessage",data: {
      "page":page,
      "size":size
    });
    return ResponseData.createFrom(responseData, responseData.data);
  }
}